package com.ruoyi.utils;

public enum ResultCode implements IErrorCode {
  SUCCESS(200L, "操作成功"),
  FAILED(500L, "操作失败"),
  VALIDATE_FAILED(404L, "参数检验失败"),
  UNAUTHORIZED(401L, "暂未登录或token已经过期"),
  FORBIDDEN(403L, "没有相关权限"),
  NOT_PRESENT(10001L, "数据不存在");

  private final long code;
  private final String message;

  public long getCode() {
    return this.code;
  }

  public String getMessage() {
    return this.message;
  }

  private ResultCode(long code, String message) {
    this.code = code;
    this.message = message;
  }
}